package com.wanmait.employment.manageController;


import com.github.pagehelper.PageInfo;
import com.wanmait.employment.entity.CompanyPic;
import com.wanmait.employment.service.CompanyPicService;
import com.wanmait.employment.util.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("manage/companyPic")
public class CompanyPicController {


    @Resource
    private CompanyPicService companyPicService;

    @GetMapping("list")
    public AjaxResult list(String title,Integer pageNum,Integer pageSize){

       PageInfo<CompanyPic> companyPicPageInfo= companyPicService.selectList(title,pageNum,pageSize);
        System.out.println(companyPicPageInfo.getList());
        return AjaxResult.success("success").put("companyPicPageInfo",companyPicPageInfo);
    }
    @GetMapping("delete")
    public AjaxResult delete(Integer id){

         companyPicService.delete(id);
        return AjaxResult.success("");
    }
}
